package org.example.controller;

import org.example.entity.User2;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/login")
@ResponseBody
public class textController {
    @RequestMapping("/a1")
    @ResponseBody
    public List<User2> ajax2(){
        List<User2> list=new ArrayList<>();
        User2 user1=new User2("xxj",21,"男");
        User2 user2=new User2("jxx",12,"男");
        list.add(user1);
        list.add(user2);
        return list;
    }


}
